package cn.yuhh.core.domain;

import cn.yuhh.core.type.Role;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author ysw
 * @create 2020-02-17 15:26
 * @descreption 用户表
 **/
@Data
@Document(collection = "user_info")
@AllArgsConstructor
@NoArgsConstructor
public class User extends Domain {


    @Indexed
    private String name;

    private String tel;

    private String password;

    private String addr;

    /**
     * 不要改默认值
     * 会对程序有影响
     */
    private Role role = Role.DECLARER;

    /**
     * 消防单位人员区域信息
     */
    @Indexed
    private AreaInfo areaInfo;


}